package cn.edu.gdut.deepcode.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 画布基础信息表
 * </p>
 *
 * @author author
 * @since 2025-04-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("canvas")
@ApiModel(value="Canvas对象", description="画布基础信息表")
public class Canvas implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "画布id")
    private Long canvasId;

    @ApiModelProperty(value = "画布主人id")
    private Long ownerId;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "画布标题")
    private String title;

    @ApiModelProperty(value = "画布封面")
    private String img;

    @ApiModelProperty(value = "画布封面缩放系数")
    private Double zoom;

    @ApiModelProperty(value = "当前的user_id对应的用户是否为画布主人")
    @TableField("is_owner")
    private Boolean isOwner;

//    @ApiModelProperty(value = "逻辑删除字段,0表示未删除,1表示删除")
//    @TableField("deleted")
//    private Boolean deleted;

    @ApiModelProperty(value = "分享状态,0表示未分享,1表示分享")
    @TableField("sharing")
    private Boolean sharing;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime=LocalDateTime.now();


}
